package com.mouse.hxsj.entity.enums;

import com.mouse.damo.micro.Press;
import lombok.Getter;

/**
 * 技能按键
 */
@Getter
public enum SkillKeyEnum {
    //Num
    Num_0(Press.NUM_0, 0),
    Num_1(Press.NUM_1, 0),
    Num_2(Press.NUM_2, 0),
    Num_3(Press.NUM_3, 0),
    Num_4(Press.NUM_4, 0),
    Num_5(Press.NUM_5, 0),
    Num_6(Press.NUM_6, 0),
    Num_7(Press.NUM_7, 0),
    Num_8(Press.NUM_8, 0),
    Num_9(Press.NUM_9, 0),
    //F
    F1(Press.F1, 0),
    F2(Press.F2, 0),
    F3(Press.F3, 0),
    F4(Press.F4, 0),
    F5(Press.F5, 0),
    F6(Press.F6, 0),
    F7(Press.F7, 0),
    F8(Press.F8, 0),
    F9(Press.F9, 0),
    F10(Press.F10, 0),
    //Ctrl
    Ctrl_A(Press.CTRL, Press.A),
    Ctrl_Z(Press.CTRL, Press.Z),
    Ctrl_X(Press.CTRL, Press.X),
    Ctrl_S(Press.CTRL, Press.S),
    //Action
    exp2_2hour(ActionEnum.exp2_2hour);
    private int key1;
    private int key2;
    private ActionEnum action;

    SkillKeyEnum(ActionEnum action) {
        this.action = action;
    }

    SkillKeyEnum(int key1, int key2) {
        this.key1 = key1;
        this.key2 = key2;
    }

    public SkillKeyEnum init(String keyName) {
        for (SkillKeyEnum actionEnum : values()) {
            if (actionEnum.name().equals(keyName)) {
                return actionEnum;
            }
        }
        return null;
    }
}
